home *** CD-ROM | disk | FTP | other *** search
/ Sounds Terrific 1 / Sounds Terrific CD (1994)(Weird Science)(Disc 2 of 2)[!][Amiga-PC].iso / modules / d / dk01.mod < prev    next >
Encoding:
Text File  |  1994-08-04  |  4.6 KB  |  135 lines

  1. 1< The Dungeon's 2SUBLIST1 mod >
  2. Master Daarkhan #1 @7653
  3. Fri Jan 03 03:12:52 1992
  4.  
  5. 2The Dungeon's Sublist Modification                    1By DaarKhan 1@7653
  6.  
  7.  
  8.     This is a real simple mod (can you block read?) that I use to simplify
  9. the listing of my subbases. It is set up for a board with the 764 subbase0 mod
  10. installed. Without the 64 subbase mod, you really don't need this, but if you
  11. want to install it anyways, you're on your own re-configuring it!
  12.  
  13.     What it does is let the user select if they want to see the LOCAL subs,
  14. or the NET subs, and I also have it configured to list my ROLE-PLAYING subs.
  15. You can change the later to be whatever you want, just include a certain
  16. string in the TITLE of the subbases you want to seperate from the rest (e.g.
  17. all of my role-playing subs have "RPG" in the title, so that this mod can
  18. seperate them. You can change it to whatever you want (for example, if you
  19. carry a lot of ANSI art subs, change it so that all of your ANSI art subs
  20. have the string "ANSI" in the title, and your all set.)
  21.  
  22.     Just block read this puppy in as your new 1void sublist()0 in 2BBS.C0 (I
  23. think). Like I said, I just yanked this out of my code and and printing it
  24. for you, so if there are any little subtle problems with it (like a variable
  25. that you don't have declared or something), then Email me and I'll help you
  26. out. This 7should0 work 100% though (BTW: I run WWIV 4.12, but it should work
  27. with any WWIV version with the 64 sub mod installed).
  28.  
  29.     I support my mods, but if your computer blows up, I'm not responsible and
  30. [insert standard disclaimer here], but I will try and help you out if
  31. possible. Ask anyone who subscribes to one of my subs, I'm a 4real0 nice guy
  32. (evil grin).
  33.  
  34. 1______________________BLOCK READ BEGIN___________________________
  35.  
  36. void sublist()
  37. {
  38.      int i,abort;
  39.      char ch,s[80],s1[80],a[80],b[80],d[80];
  40.  
  41.      do {
  42.           prt(2,"Sublist [L,N,R,*,Q,?] : ");
  43.           ch=onek("LNR*Q?");
  44.           switch (ch) {
  45.                case '?':
  46.                     prt(3,"Help");
  47.                     nl();
  48.                     printfile("SUB_MENU");       /* Make this file! */
  49.                     break;
  50.                case 'Q':
  51.                     prt(3,"Quit");
  52.                     nl();
  53.                     return;
  54.                case 'L':
  55.                     prt(3,"Local subs");
  56.                     nl();
  57.                     break;
  58.                case 'N':
  59.                     prt(3,"Network subs");
  60.                     nl();
  61.                     break;
  62.                case 'R':
  63.                     prt(3,"Role-playing subs");  /* Change if you want */
  64.                     nl();
  65.                     break;
  66.                case '*':
  67.                     prt(3,"All subs");
  68.                     nl();
  69.                     break;
  70.           }
  71.      } while (ch=='?');
  72.      abort=0;
  73.      i=0;
  74.  
  75.      while ((i<64) && (usub[i].subnum!=-1)) {
  76.           if (usub[i].subnum<32) {
  77.                if ((1L << (usub[i].subnum)) & thisuser.qscn)
  78.                     strcpy(a,usub[i].keys);
  79.                else
  80.                     strcpy(a,"--");
  81.           } else {
  82.                if ((1L << (usub[i].subnum-32)) & thisuser.qscn2)
  83.                     strcpy(a,usub[i].keys);
  84.                else
  85.                     strcpy(a,"--");
  86.           }
  87.  
  88.           if (syscfg.systemnumber) {
  89.                if (subboards[usub[i].subnum].type) {
  90.                     if (subboards[usub[i].subnum].anony & anony_val_net)
  91.                          strcpy(b,"[Net]");
  92.                     else
  93.                          strcpy(b,"<Net>");
  94.                } else
  95.                     strcpy(b,"     ");
  96.           }
  97.  
  98.           strcpy(d,subboards[usub[i].subnum].name);
  99.  
  100.  
  101.           sprintf(s,"     1%2.2s   7%-5.5s    2%-50.50s0 ",a,b,d);
  102.  
  103.           switch (ch) {
  104.                case 'L':
  105.                     if (!subboards[usub[i].subnum].type) pla(s,&abort);
  106.                     break;
  107.                case 'N':
  108.                     if (subboards[usub[i].subnum].type) pla(s,&abort);
  109.                     break;
  110.                case 'R':
  111.                     if (strstr(subboards[usub[i].subnum].name,"RPG")!=NULL)
  112.                         pla(s,&abort);
  113.                     break;
  114.                case '*':
  115.                     pla(s,&abort);
  116.                     break;
  117.           }
  118.           i++;
  119.      }
  120.      if (i==0)
  121.           pla("None.",&abort);
  122.      nl();
  123. }
  124.  
  125. 1_____________________BLOCK READ END_______________________
  126.  
  127.  
  128.     There you go! Like I said, if you have any problems, please get in touch
  129. with me!
  130.  
  131. 3┌┐7┌┐1┌┐7┌┐3┌┐
  132. 3│4Daarkhan3│
  133. 3└┘7└┘1└┘7└┘3└┘
  134.  
  135.